﻿using System.Collections.Specialized;

namespace Web7.Core.Configuration
{
    public static class Web7SettingConfigurationElementCollectionExtensions
    {
        public static NameValueCollection ToNameValueCollection(this Web7SettingConfigurationElementCollection settings)
        {
            NameValueCollection nvm = new NameValueCollection(settings.Count);

            foreach (Web7SettingConfigurationElement setting in settings)
                nvm.Add(setting.Name, setting.Value);

            return nvm;
        }
    }
}
